how to get array input from user in Java